package com.bw.paper.mvp.view.Fragment;

import android.os.Bundle;

import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.bw.paper.mvp.view.Fragment.people.adapter.PeopleVpAdapter;
import com.bw.paper.R;
import com.flyco.tablayout.SlidingTabLayout;

public class PeopleFragment extends Fragment {

    public PeopleFragment() {
        // Required empty public constructor
    }


    private SlidingTabLayout people_tab;
    private ViewPager people_vp;
    private PeopleVpAdapter adapter;
    private  View inflate;
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
         inflate = inflater.inflate(R.layout.fragment_people, container, false);
        init();
         return inflate;
    }

    private void init(){
        people_tab = inflate.findViewById(R.id.people_tab);
        people_vp = inflate.findViewById(R.id.people_vp);
        adapter = new PeopleVpAdapter(getFragmentManager());
        people_vp.setAdapter(adapter);
        people_tab.setViewPager(people_vp);
    }
}